package com.chzc.pojo;

/**
 * @author CV大魔王
 * @Description 学生实体类
 * @date 2021/3/26 19:44
 */
public class Student extends User {

    /**
     * 真实姓名
     */
    private String realName;

    /**
     * 性别
     */
    private String sex;

    /**
     * 年龄
     */
    private Integer age;

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "username='" + super.getUsername() + '\'' +
                "password='" + super.getPassword() + '\'' +
                "realName='" + realName + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                '}';
    }

    public Student() {
    }


    /**
     * 全参构造，包含父类字段
     *
     * @param username 账号
     * @param password 密码
     * @param realName 真实姓名
     * @param sex      性别
     * @param age      年龄
     */
    public Student(String username, String password, String realName, String sex, Integer age) {
        super.setUsername(username);
        super.setPassword(password);
        this.realName = realName;
        this.sex = sex;
        this.age = age;
    }
}
